The code stacks panels with proper names and then displays some object. Below, the objects plot, pt and text are defined in the server.
# Inside the body
navlistPanel(
"Stuff A",
tabPanel("Graph 1", plotOutput("plot")),
tabPanel("Table 2", DT::dataTableOutput("pt")),
"Header B",
tabPanel("Text 3", h1(textOutput("text"))),
tabPanel("Component 4"),
"-----",
tabPanel("Component 5"),
widths = c(2,10)
)
Navbars are usually used in pure Shiny (not in shinydashboards). They are a bit redundant with sidebars.

The reference pages for dashboard structure
Formatting: going further
Boxes for KPIs
infoBox & valueBox!
From server with renderInfoBox() \(\rightarrow\) to UI via infoBoxOutput()
From server with renderValueBox() \(\rightarrow\) to UI via valueBoxOutput()

See also tabBox().
Boxes: syntax
output$box1 <- renderValueBox({
olympics <- data()
valueBox(
value = sum(olympics$Medal=="Gold"),
subtitle = "Gold",
icon = icon("medal", lib = "font-awesome"),
color = "yellow"
)
})

Plotly is back: fully integrable into shiny
It’s always better to resort to plotly: https://plot.ly/r/ It’s incredibly simple and very effective!
1. In the server: renderPlot() \(\rightarrow\) renderPlotly()
2. In the server, save the ggplot in a variable and then use ggplotly()
3. In the UI (body): plotOutput() \(\rightarrow\) plotlyOutput()
library(plotly)
g <- ggplot(diamonds, aes(x = color, fill = color)) + geom_bar()
ggplotly(g)
What are your questions?
A ‘bad’ question is better than no question (there are no bad questions).
Even the best make errors: https://twitter.com/hadleywickham/status/1188516615635324928?s=11
Next week is the last pure Shiny session: make progress if you want me to help you!
Also, I will talk about app online deployment. If you don’t have an app that works, use one from the course.
Your turn!